package com.gqh.weather.validation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

/**
 * 自定义城市码验证注解
 */
@Target({ ElementType.FIELD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CitycodeValidator.class)
@Documented
public @interface Citycode {

    String message() default "城市码格式不正确";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}